/*
const MNTPATHLEN = 1024;
const FHSIZE = 32;

typedef string dirpath<MNTPATHLEN>;
typedef opaque fhandle[FHSIZE];

union fhstatus switch (unsigned int status) {
case 0:
  fhandle directory;
default:
  void;
};

typedef int mountlist;
typedef int exportlist;

program MOUNTPROG {
  version MOUNTVERS {
    
    void
    MOUNTPROC_NULL(void) = 0;
    
    fhstatus
    MOUNTPROC_MNT(dirpath) = 1;
    
    mountlist
    MOUNTPROC_DUMP(void) = 2;
    
    void
    MOUNTPROC_UMNT(dirpath) = 3;
    
    void
    MOUNTPROC_UMNTALL(void) = 4;
    
    exportlist
    MOUNTPROC_EXPORT(void)  = 5;
  } = 1;
} = 100005;

*/

const MNTPATHLEN = 1024;
const MNTNAMLEN = 255;
const FHSIZE = 32;

typedef opaque fhandle[FHSIZE];

union fhstatus switch (unsigned status) {
  case 0:
    fhandle directory;
  default:
    void;
};

typedef string dirpath<MNTPATHLEN>;

typedef string name<MNTNAMLEN>;

struct mountlist {
  name      hostname;
  dirpath   directory;
  mountlist nextentry;
};

struct groups {
  name grname;
  groups grnext;
};

struct exportlist {
  dirpath filesys;
  groups groups;
  exportlist next;
};

program MOUNTPROG {
  version MOUNTVERS {
    void
    MOUNTPROC_NULL(void) = 0;
    
    fhstatus
    MOUNTPROC_MNT(dirpath) = 1;
    
    mountlist
    MOUNTPROC_DUMP(void) = 2;
    
    void
    MOUNTPROC_UMNT(dirpath) = 3;
    
    void
    MOUNTPROC_UMNTALL(void) = 4;
    
    exportlist
    MOUNTPROC_EXPORT(void)  = 5;
  } = 1;
} = 100005;
